<template>
  <div>
    <el-upload
      class="upload-demo"
      drag
      action=""
      multiple
      :http-request="handleUpload"
    >
      <i class="el-icon-upload"></i>
      <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
    </el-upload>
    <div ref="cont"></div>
  </div>
</template>

<script>
import { excelImport } from "@/utils/excel-sdk";
export default {
  methods: {
    handleUpload(info) {
      console.log(info);
      excelImport(info.file, this.$refs.cont);
    },
  },
};
</script>

<style lang="scss" scoped></style>
